package com.molichuxing.gateway.bff.order.entity.response;

import java.math.BigDecimal;
import java.time.LocalDateTime;

import com.molichuxing.framework.dto.ResponseRootDto;
import com.molichuxing.services.property.OrderTypeEnum;

import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

/**
 * 用户查询订单信息vo
 * 
 * @author zoumingyu
 * @date 2019年8月26日
 *
 */
@Data
public class UserOrderVo extends ResponseRootDto {
	private static final long serialVersionUID = -8238439735168617193L;

	@ApiModelProperty(value = "订单号")
	private Long orderCode;

	@ApiModelProperty(value = "商品品类(2：专属里程，3：订阅里程)")
	private Integer orderType;

	@ApiModelProperty(value = "商品品类str")
	private String orderTypeStr;

	@ApiModelProperty(value = "用户id")
	private Integer userId;

	@ApiModelProperty(value = "车型id")
	private Integer vehicleId;

	@ApiModelProperty(value = "车型名称")
	private String vehicleName;

	@ApiModelProperty(value = "下单门店id")
	private Integer placeStoreId;

	@ApiModelProperty(value = "下单门店")
	private String placeStoreName;

	@ApiModelProperty(value = "用车时长")
	private Integer transportTime;

	@ApiModelProperty(value = "订单金额")
	private BigDecimal orderAmount;

	@ApiModelProperty(value = "下单时间")
	private LocalDateTime orderTime;

	@ApiModelProperty(value = "订单状态()")
	private Integer orderStatus;

	@ApiModelProperty(value = "订单状态str")
	private String orderStatusStr;

	public void setOrderType(OrderTypeEnum orderType) {
		this.orderType = orderType == null ? null : orderType.getValue();
		this.orderTypeStr = orderType == null ? null : orderType.getName();
	}
}
